<!-- 引导页 -->
<template>
  <view class="content-center">
    <view class="icon-mh">
      <image src="@/static/imgs/index-mh.png"></image>
      <view class="main-title">民航移动门户</view>
      <view class="sub-title">中国民用航空局</view>
    </view>

    <van-loading size="36" vertical color="#0081ff">加载中...</van-loading>

  </view>
</template>

<script>
export default {
  name: "index",
  components: {},
  props: {},

  onLoad: async function (option) {
    await this.$onLaunched //解決bug：执行完onLaunch后再执行页面onLoad
    this.appType = option.type
    this.redirectIndex()
//    setTimeout(() => {
//      this.redirectIndex()
//    }, 1000)
  },

  data() {
    return {
      appType: 'oa',                 // 默认oa
      appId: '2621440-1638400',   // appId,默认oa
      systemKey:'',
      systemFlag:'yidong',
      lxUserInfo:{}
    }
  },
  created() {},
  async mounted() {
    // 正式部署删掉
    console.log("mounted===>: ")
//   await this.lx.getUserInfo(this.appId, this.appType)
//   this.lxUserInfo = this.cache.get('lxUserInfo')
  },
  computed: {},
  methods: {


    // 根据不同蓝信用户跳转不同首页
    redirectIndex() {
      console.log("开始跳转--->")
      let deptName = this.cache.get('userInfo').deptName
      console.log("redirectIndex---" + JSON.stringify(this.cache.get('userInfo')))
      // 根据app类型跳转不同页
      this.common.toIndexByType(deptName, this.appType);
    },
  },
}
</script>

<style scoped>
  .content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 100vw;
    height: 80vh;
  }
  .icon-mh{
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 400rpx;
  }
  .icon-mh image{
    width: 350rpx;
    height: 160rpx;
  }
  .icon-mh .main-title{
    font-weight: bold;
    font-size: 50rpx;
    color: #666666;
    margin-top: 80rpx;
  }
  .icon-mh .sub-title{
    font-size: 40rpx;
    color: #a2a2a2;
    margin-top: 20rpx;
  }
  /deep/ .van-cell__title {
    min-width: 30%;
  }
</style>
